#!/bin/bash

jn_pids=$(ps -ef | grep python3.8 | grep jupyter | grep -v grep | awk '{print $2}' | xargs)
[ -z "${jn_pids}" ] && echo "jupyter notebook is not run" || kill -9 ${jn_pids}


JUPYTER_LAB_HOME=./python3.11

mkdir -p $JUPYTER_LAB_HOME/logs

unset PATH
export PATH=$JUPYTER_LAB_HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
# export LD_LIBRARY_PATH=$JUPYTER_LAB_HOME/lib


$JUPYTER_LAB_HOME/bin/python3 -m jupyter lab --JupyterApp.config_file=$JUPYTER_LAB_HOME/config/jupyter_lab_config.py &

ps -ef | grep jupyter




